package com.threeti.mecool.legacy.domain.model.acl;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.threeti.mecool.shared.util.AbstractFlatRawTreeNode;

/** 企业的组织机构(遗留，形成以集团总部作为根节点的组织机构树) */
@Entity
@Table(name = "MD_ORG")
public class OrgnizationLegacy extends AbstractFlatRawTreeNode<String> {
  @Id
  @Column(name="ORG_CODE")
  private String code;
  
  @Column(name="P_ORG_CODE")
  private String parentCode;
  
  @Column(name="ORG_NAME")
  private String name;
  
  @Column(name="AD_ID")
  private Long adId;
  
  @Column(name="ORG_KIND")
  private String kind;
  
  @Override
  public String getId() {
    return code;
  }
  
  @Override
  public String getParentId() {
    return parentCode;
  }

  public String getName() {
    return name;
  }

  public Long getAdId() {
    return adId;
  }

  public String getKind() {
    return kind;
  }

  @Override
  public String toString() {
    return "OrgnizationLegacy [code=" + code + ", parentCode=" + parentCode + ", name=" + name + ", adId=" + adId + ", kind=" + kind + "]";
  }
  
  
}
